package com.wangjw.springbootdemo.exception;

import com.wangjw.springbootdemo.pojo.IMoocJSONResult;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by wangjw on 18/5/29.
 */
//@RestControllerAdvice
public class IMoocAjaxExceptionHandler {

//    @ExceptionHandler(value = Exception.class)
    public IMoocJSONResult defaultErrorHandler(HttpServletRequest request, Exception e) throws Exception {
        e.printStackTrace();
        return IMoocJSONResult.errorException(e.getMessage());
    }
}
